package io.adrainty.bolee.security.models.constants;

import io.adrainty.bolee.security.models.valobj.CompanyStatusEnum;

import java.util.Set;

/**
 * <p>CompanyConstants</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description CompanyConstants
 * @since 2025/8/1 14:39:12
 */
public class CompanyConstants {

    private CompanyConstants() {}

    /**
     * 允许的商户状态
     */
    public static final Set<CompanyStatusEnum> VALIDATED_COMPANY_STATUS = Set.of(CompanyStatusEnum.NORMAL, CompanyStatusEnum.GUEST);

    /**
     * 商户缓存前缀
     */
    public static final String COMPANY_CACHE_PREFIX = "company:";

    /**
     * 商户基础信息缓存key
     */
    public static final String COMPANY_BASIC_CACHE_KEY = COMPANY_CACHE_PREFIX + "basic:";

    /**
     * <p>商户列表缓存key</p>
     */
    public static final String COMPANY_LIST_KEY = COMPANY_CACHE_PREFIX + "list";

    /**
     * <p>商户分页缓存key</p>
     * <p>key: company:page: + pageNum + ":" + pageSize</p>
     * <p>value: List<CompanyEntity></p>
     */
    public static final String COMPANY_PAGE_KEY = COMPANY_CACHE_PREFIX + "page:";

    /**
     * <p>商户站点缓存key</p>
     * <p>key: company:website: + url</p>
     * <p>value: CompanyEntity</p>
     */
    public static final String COMPANY_WEBSITE_CACHE_KEY = COMPANY_CACHE_PREFIX + "website:";

}
